<!DOCTYPE html>
<!--suppress ALL-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IP区域管理</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" th:href="@{/bootstrap/bootstrap-select.css}">
    <link th:href="@{/bootstrap/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/zlupdate.css}" rel="stylesheet">
    <script th:src="@{/js/jquery-1.9.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/bootstrap/bootstrap-select.js}">
    </script>
    <script type="text/javascript" th:src="@{/bootstrap/bootstrap.min.js}"></script>
    <script type="text/javascript">
        document.addEventListener("DOMContentLoaded", function () {
            $('.selectpicker').selectpicker({
                'selectedText': 'cat'
            });
        });
        // document.addEventListener("DOMContentLoaded", function () {
        //     document.body.style.display = "block";
        // });
        $(document).ready(function () {
            $(".b").fadeIn(600)
        });
    </script>
</head>
<body class="b" style="font-size: 16px;background-color: #f9f9f9">
<form style="text-align: center;margin-top: 5%" method="post" enctype="multipart/form-data" action="/admin/admin/areaFilterPost">
    <input name="areaid" hidden th:if="${areafilter}" type="text" th:value="${areafilter.areaid}">
    <div class="col-sm-12">
        <div class="col-sm-3" style="margin-top: 1%"><b>
            <input disabled style="background-color: transparent;border: 0"
                   type="text"
                   value="区域名称:"/>
        </b></div>
        <div th:unless="${areafilter}" class="col-sm-8">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="areaname"
                   required
                   placeholder="必填"/>
        </div>
        <div th:if="${areafilter}" class="col-sm-8">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="areaname"
                   required
                   placeholder="必填" th:value="${areafilter.areaname}"/>
        </div>
    </div>
    <div class="col-sm-12">
        <div class="col-sm-3" style="margin-top: 1%"><b><input disabled style="background-color: transparent;border: 0"
                                                               type="text"
                                                               value="区域等级:"/></b></div>
        <div th:unless="${areafilter}" class="col-sm-8">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="areapet"
                   required onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                   placeholder="必填"/>
        </div>
        <div th:if="${areafilter}" class="col-sm-8">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="areapet"
                   required onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                   placeholder="必填" th:value="${areafilter.areapet}"/>
        </div>
    </div>
    <div class="col-sm-12">
        <div class="col-sm-3" style="margin-top: 1%"><b><input disabled style="background-color: transparent;border: 0"
                                                               type="text"
                                                               value="同IP允许时间内访问篇数:"/></b></div>
        <div th:unless="${areafilter}" class="col-sm-8">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="openfilerecordforip"
                   required onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                   placeholder="请输入数字"/>
        </div>
        <div th:if="${areafilter}" class="col-sm-8">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="openfilerecordforip"
                   required onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
                   placeholder="请输入数字" th:value="${areafilter.openfilerecordforip}"/>
        </div>
    </div>
    <div class="col-sm-12">
        <div class="col-sm-3" style="margin-top: 1%"><b><input disabled style="background-color: transparent;border: 0"
                                                               type="text"
                                                               value="同IP允许时间内访问流量:"/></b></div>
        <div class="col-sm-8" th:if="${areafilter}">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="openfilestreamforip"
                  required placeholder="请输入数字" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" th:value="${areafilter.openfilestreamforip}"/>
        </div>
        <div class="col-sm-8" th:unless="${areafilter}">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="openfilestreamforip"
                  required placeholder="请输入数字" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"/>
        </div>
    </div>
    <div class="col-sm-12">
        <div class="col-sm-3" style="margin-top: 1%"><b><input disabled style="background-color: transparent;border: 0"
                                                               type="email"
                                                               value="区域说明:"/></b></div>
        <div class="col-sm-8" th:if="${areafilter}">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="areadesc"
                   placeholder="区域说明" th:value="${areafilter.areadesc}"/>
        </div>
        <div class="col-sm-8" th:unless="${areafilter}">
            <input style="margin-top: 5px;margin-bottom: 5px" class="form-control" type="text" name="areadesc"
                   placeholder="区域说明"/>
        </div>
    </div>
    <div style="margin-top: 2%;text-align: center" class="col-sm-11">
        <input style="border-radius:3px;width: 15%" type="button" onclick="javascript:history.go(-1)" value="返回上一页"/>
        <!--<input style="border-radius:3px;width: 15%" type="button"-->
               <!--th:onclick="|javascript:goHome('/admin/admin/usersget/1/10')|" value="返回列表页"/>-->
        <input style="border-radius:3px;width: 15%" type="submit" value="提交资料"/>
    </div>
</form>
<script>
    function goHome(url) {
        window.location.replace(url)
    };
</script>
</body>
</html>